package alisms;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import org.springframework.beans.BeansException;

import service.message.WeixinUserInfo;
import util.JdbcUtils;
import util.MyFactory;

public class SqlTest {
	/**
	 * @param args
	 * @throws BeansException
	 * @throws SQLException
	 */
	/**
	 * @param args
	 * @throws BeansException
	 * @throws SQLException
	 */
	public static void main(String[] args) throws BeansException, SQLException {
		
		
		System.out.println("hello");
		System.out.println(System.currentTimeMillis());
//		WeixinUserInfo userInfo = new WeixinUserInfo();
//		String aString = "111🐵111";
//		userInfo.setNickname("111🐵111");
//		System.out.println("heeeeee");
//		Connection conn;
//		conn = MyFactory.context.getBean("JdbcUtils",JdbcUtils.class).getConnection();
//		System.out.println("1______e");
//		String sqlInsert = String.format("insert into MyTest set NickName='%s'",aString);
//		
//		PreparedStatement pstmt = null;
//		System.out.println("2___________");
//		
//		pstmt = conn.prepareStatement(sqlInsert);//相当于python操作数据库的游标
//		System.out.println("用户的昵称:");
//		
//		System.out.println(userInfo.getNickname());
//		//pstmt.setString(1, userInfo.getNickname());
//		
//	    pstmt.executeQuery("SET NAMES utf8mb4");
//		pstmt.executeUpdate();
//		
		
		
	}
}
